﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
using CustomersSuppliersBusinessLayer;
using CustomersSuppliersDataLayer;
using System.Collections;
using WebHelper;
using WebHelper.Modules;

namespace CustomersSuppliersWebApplication
{
    public partial class WebFormHome : WebFormBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            this.PageTitle = "الرئيسية";
            if (SecurityModule.LicenceUnlimited)
            {
                this.RadButtonRegistrationkey.Text = "نسخة كاملة";
                this.RadButtonRegistrationkey.Enabled = false;
            }
            else
            {
                    this.RadButtonRegistrationkey.Text = "هذة نسخة تجريبية لمدة " + SecurityModule.LicenceRemainingDays.Days + "يوما";
            }
        }

        protected void RadButtonRegistrationkey_Click(object sender, EventArgs e)
        {
            this.RadAsyncUploadRegistration.Visible = true;
            this.RadButtonRegistrationkey.Text = "انهاء";
            this.RadButtonRegistrationkey.Checked = !this.RadButtonRegistrationkey.Checked;
            if (!this.RadButtonRegistrationkey.Checked)
            {
                this.Response.Redirect(this.Request.Url.ToString());
            }
        }

        protected void RadAsyncUploadRegistration_FileUploaded(object sender, FileUploadedEventArgs e)
        {
        }
    }
}